#ifndef COLOR_BUTTON_H
#define COLOR_BUTTON_H

#include <QToolButton>

class ColorButton : public QToolButton {
  Q_OBJECT
  Q_PROPERTY(QColor color READ color WRITE setColor)
 public:
  explicit ColorButton(QWidget* parent = NULL);

  QColor color() const;
  void setColor(const QColor& color);

 signals:
  void colorChanged(const QColor& color);

 private slots:
  void chooseColor();

 private:
  QColor color_;
};

#endif // COLOR_BUTTON_H
